Optimizing Compilation and Computational Complexity of Constraint Handling Rules

نویسنده

  • Jon Sneyers
چکیده

Constraint Handling Rules (CHR) is a very-high-level declarative programming language based on concurrent multiset rewrite rules that are conditional, multiheaded, and committed-choice. Originally designed in the early 1990s as a specialpurpose programming language for adding user-defined constraint solvers to a host language, CHR has evolved over the last decade into a powerful and elegant general-purpose language with a wide spectrum of application domains. Computational complexity theory is the study of scalability of computer programs in terms of the computational resources they require — in particular, time (cpu usage) and space (memory usage). In this dissertation we investigate the CHR programming language from the point of view of computational complexity theory. The first part introduces complexity theory, CHR, and CHR compilation. In the second part, we improve the state of the art by proposing and implementing several compiler optimizations. We confirm experimentally that these optimizations improve both the time and space complexity of CHR programs. Finally, in the third part of this dissertation, we prove a “complexity-wise completeness” result. We demonstrate that the CHR language and state-of-theart CHR systems (that implement the compiler optimizations of the previous part) are sufficiently efficient in the following precise sense: every algorithm can be implemented in CHR and be executed with the optimal asymptotic time and space complexity.

منابع مشابه

Optimizing compilation of constraint handling rules in HAL

In this paper we discuss the optimizing compilation of Constraint Handling Rules (CHRs). CHRs are a multi-headed committed choice constraint language, commonly applied for writing incremental constraint solvers. CHRs are usually implemented as a language extension that compiles to the underlying language. In this paper we show how we can use different kinds of information in the compilation of ...

متن کامل

Optimizing Compilation of CHR with Rule Priorities

Constraint Handling Rules were recently extended with userdefinable rule priorities. This paper shows how this extended language can be efficiently compiled into the underlying host language. It extends previous work by supporting rules with dynamic priorities and by introducing various optimizations. The effects of the optimizations are empirically evaluated and the new compiler is compared wi...

متن کامل

Transformation-based Indexing Techniques for Constraint Handling Rules

Multi-headed rules are essential for the expressiveness of Constraint Handling Rules (CHR), but incur considerable performance overhead. Current indexing techniques are often unable to address this problem—they require matchings to have particular form, or offer good run-time complexity rather than good absolute figures. We introduce two lightweight program transformations, based on term flatte...

متن کامل

Suspension Optimization and In-place Updates for Optimizing CHR Compilation

We introduce two CHR compiler optimizations aimed at reducing garbage creation by reusing suspension terms, used to represent the CHR constraints. We have implemented both optimizations in the K.U.Leuven CHR system. The optimizations dramatically improve the memory footprint and speed of CHR programs: in several benchmarks we have measured speedups of 40% and more, and a reduction of memory usa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

متن کامل
عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009